package com.irdstudio.efp.edoc.service.domain;

import com.alibaba.fastjson.JSONObject;

import java.util.Date;

/**
 * yed_upload_record实体类
 * 
 * @author 
 *
 */
public class YedUploadRecord {
	/***/
	private String recordId; 
	/**产品id*/
	private String prdId; 
	/**流水号*/
	private String applSeq; 
	/**处理阶段（1-授信 2-用信 3-借据）*/
	private String dealType; 
	/**文件类型（Y01-授权书 Y02-借款合同 Y03-征信报告）*/
	private String fileType; 
	/**待上传文件路径*/
	private String fileUrl; 
	/**上传状态（1、成功 2、失败）*/
	private Integer upSta; 
	/**上传次数*/
	private Integer upNum; 
	/**上传返回报文*/
	private String upRetMsg; 
	/**错误信息*/
	private String upErrMsg; 
	/**上传时间*/
	private Date upTime;
	/**插入时间*/
	private Date createTime;
	/**
	 * 实例化
	 */
	public YedUploadRecord() {
		super();
	}
	/**
	 * 实例化
	 * 
	 * @param obj
	 */
	public YedUploadRecord(JSONObject obj) {
		this();
		if (obj.get("recordId") instanceof String) {
			this.setRecordId((String) obj.get("recordId"));
		}
		if (obj.get("prdId") instanceof String) {
			this.setPrdId((String) obj.get("prdId"));
		}
		if (obj.get("applSeq") instanceof String) {
			this.setApplSeq((String) obj.get("applSeq"));
		}
		if (obj.get("dealType") instanceof String) {
			this.setDealType((String) obj.get("dealType"));
		}
		if (obj.get("fileType") instanceof String) {
			this.setFileType((String) obj.get("fileType"));
		}
		if (obj.get("fileUrl") instanceof String) {
			this.setFileUrl((String) obj.get("fileUrl"));
		}
		if (obj.get("upSta") instanceof Number) {
			this.setUpSta(((Number) obj.get("upSta")).intValue());
		}
		if (obj.get("upNum") instanceof Number) {
			this.setUpNum(((Number) obj.get("upNum")).intValue());
		}
		if (obj.get("upRetMsg") instanceof String) {
			this.setUpRetMsg((String) obj.get("upRetMsg"));
		}
		if (obj.get("upErrMsg") instanceof String) {
			this.setUpErrMsg((String) obj.get("upErrMsg"));
		}
		this.setUpTime((Date) obj.get("upTime"));
		this.setCreateTime((Date) obj.get("createTime"));
	}
	
	/**
	 * 将当前对象转换为JsonObject
	 * 
	 * @return
	 */
	public JSONObject toJson() {
		JSONObject result = new JSONObject();
		if (this.getRecordId() != null) {
			result.put("recordId",this.getRecordId());
		}
		if (this.getPrdId() != null) {
			result.put("prdId",this.getPrdId());
		}
		if (this.getApplSeq() != null) {
			result.put("applSeq",this.getApplSeq());
		}
		if (this.getDealType() != null) {
			result.put("dealType",this.getDealType());
		}
		if (this.getFileType() != null) {
			result.put("fileType",this.getFileType());
		}
		if (this.getFileUrl() != null) {
			result.put("fileUrl",this.getFileUrl());
		}
		if (this.getUpSta() != null) {
			result.put("upSta",this.getUpSta());
		}
		if (this.getUpNum() != null) {
			result.put("upNum",this.getUpNum());
		}
		if (this.getUpRetMsg() != null) {
			result.put("upRetMsg",this.getUpRetMsg());
		}
		if (this.getUpErrMsg() != null) {
			result.put("upErrMsg",this.getUpErrMsg());
		}
		if (this.getUpTime() != null) {
			result.put("upTime",this.getUpTime());
		}
		if (this.getCreateTime() != null) {
			result.put("createTime",this.getCreateTime());
		}
		return result;
	}
	
	
	/**
	 * 获取recordId
	 * 
	 * @return
	 */
	public String getRecordId() {
		return recordId;
	}

	/**
	 * 设置recordId
	 * 
	 * @param recordId
	 */
	public void setRecordId(String recordId) {
		this.recordId = recordId;
	}
	
	/**
	 * 获取prdId
	 * 
	 * @return
	 */
	public String getPrdId() {
		return prdId;
	}

	/**
	 * 设置prdId
	 * 
	 * @param prdId
	 */
	public void setPrdId(String prdId) {
		this.prdId = prdId;
	}
	
	/**
	 * 获取applSeq
	 * 
	 * @return
	 */
	public String getApplSeq() {
		return applSeq;
	}

	/**
	 * 设置applSeq
	 * 
	 * @param applSeq
	 */
	public void setApplSeq(String applSeq) {
		this.applSeq = applSeq;
	}
	
	/**
	 * 获取dealType
	 * 
	 * @return
	 */
	public String getDealType() {
		return dealType;
	}

	/**
	 * 设置dealType
	 * 
	 * @param dealType
	 */
	public void setDealType(String dealType) {
		this.dealType = dealType;
	}
	
	/**
	 * 获取fileType
	 * 
	 * @return
	 */
	public String getFileType() {
		return fileType;
	}

	/**
	 * 设置fileType
	 * 
	 * @param fileType
	 */
	public void setFileType(String fileType) {
		this.fileType = fileType;
	}
	
	/**
	 * 获取fileUrl
	 * 
	 * @return
	 */
	public String getFileUrl() {
		return fileUrl;
	}

	/**
	 * 设置fileUrl
	 * 
	 * @param fileUrl
	 */
	public void setFileUrl(String fileUrl) {
		this.fileUrl = fileUrl;
	}
	
	/**
	 * 获取upSta
	 * 
	 * @return
	 */
	public Integer getUpSta() {
		return upSta;
	}

	/**
	 * 设置upSta
	 * 
	 * @param upSta
	 */
	public void setUpSta(Integer upSta) {
		this.upSta = upSta;
	}
	
	/**
	 * 获取upNum
	 * 
	 * @return
	 */
	public Integer getUpNum() {
		return upNum;
	}

	/**
	 * 设置upNum
	 * 
	 * @param upNum
	 */
	public void setUpNum(Integer upNum) {
		this.upNum = upNum;
	}
	
	/**
	 * 获取upRetMsg
	 * 
	 * @return
	 */
	public String getUpRetMsg() {
		return upRetMsg;
	}

	/**
	 * 设置upRetMsg
	 * 
	 * @param upRetMsg
	 */
	public void setUpRetMsg(String upRetMsg) {
		this.upRetMsg = upRetMsg;
	}
	
	/**
	 * 获取upErrMsg
	 * 
	 * @return
	 */
	public String getUpErrMsg() {
		return upErrMsg;
	}

	/**
	 * 设置upErrMsg
	 * 
	 * @param upErrMsg
	 */
	public void setUpErrMsg(String upErrMsg) {
		this.upErrMsg = upErrMsg;
	}
	
	/**
	 * 获取upTime
	 * 
	 * @return
	 */
	public Date getUpTime() {
		return upTime;
	}

	/**
	 * 设置upTime
	 *
	 * @param upTime
	 */
	public void setUpTime(Date upTime) {
		this.upTime = upTime;
	}
	
	/**
	 * 获取createTime
	 * 
	 * @return
	 */
	public Date getCreateTime() {
		return createTime;
	}

	/**
	 * 设置createTime
	 *
	 * @param createTime
	 */
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Override
	public String toString() {
		return "YedUploadRecord [recordId=" + recordId + " , prdId=" + prdId + " , applSeq=" + applSeq + " , dealType=" + dealType + " , fileType=" + fileType + " , fileUrl=" + fileUrl + " , upSta=" + upSta + " , upNum=" + upNum + " , upRetMsg=" + upRetMsg + " , upErrMsg=" + upErrMsg + " , upTime=" + upTime + " , createTime=" + createTime + "  ]";
	
	}
	
	
}
